package com.liuyu.common.framework.insurance.picc.zb.model.request.insure;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 人保总部通用接口保单信息
 *
 * @author: liuyu
 * @date: 2022/3/30 12:58
 * @version: 1
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PiccZbPolicyInfo {
    /**
     * 请求序列号
     */
    @Schema(description = "请求序列号")
    private Integer serialNo;

    @Schema(description = "归属ID:项目归属不固情况下传输此字段，需求中每个归属ID对应一套归属机构")
    private String comFlag;

    /**
     * 人保险种代码
     */
    @Schema(description = "人保险种代码")
    private String riskCode;

    /**
     * 签单日期
     */
    @Schema(description = "签单日期,格式：yyyy-mm-dd hh24:mi:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private LocalDateTime operateDate;
    /**
     * 起保日期
     */
    @Schema(description = "起保日期,格式：yyyy-mm-dd")
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate startDate;
    /**
     * 起保小时
     */
    @Schema(description = "起保小时")
    private Integer startHour;


    @Schema(description = "起保分钟")
    private String startMinute;


    @Schema(description = "起保秒数")
    private Integer startSecond;

    /**
     * 终保日期
     */
    @Schema(description = "终保日期")
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate endDate;


    /**
     * 终保小时
     */
    @Schema(description = "终保小时")
    private String endHour;

    @Schema(description = "终保分钟")
    private String endMinute;


    @Schema(description = "终保秒数")
    private String endSecond;


    @Schema(description = "币种:默认为CNY，若传输此字段，以传输字段为准")
    private String currency;

    @Schema(description = "争议解决方式<br>1 诉讼；2 仲裁 默认为1，如果传输2仲裁，则arbitBoardName必传")
    private String argueSolution;

    @Schema(description = "仲裁机构名称 argueSolution为2是必传")
    private String arbitBoardName;

    @Schema(description = "保单总保险费 精度：小数点后两位   ")
    private BigDecimal sumPremium;

    @Schema(description = "保单总保险金额 精度：小数点后两位")
    private BigDecimal sumAmount;

    /**
     * 投保人
     */
    @Schema(description = "投保人信息节点")
    private PiccZbApplicant applicant;

    /**
     * 被保险人
     */
    @Schema(description = "Insureds")
    @NotEmpty(message = "被保险人不能为空")
    private List<PiccZbInsured> insureds;
    /**
     * 雇员信息
     */
    @Schema(description = "雇员信息节点")
    private List<PiccZbEmployee> employees;
    /**
     * 方案信息节点
     */
    @Schema(description = "方案信息节点")
    private List<PiccZbInsuredPlan> plans;

    @Schema(description = "特殊节点配置,此节点用于处理部分险种特殊节点，如：货运险货运信息。")
    private List<Map<String, String>> extendList;


    @Schema(description = "责任险信息字段 责任险此节点必录")
    private List<PiccZbLiabInfo> liabilities;

    @Schema(description = "算费信息节点 部分险种算费方式特殊，此节点传输算费影响因子")
    private PiccZbCalculateInfo calculateInfo;

    @Schema(description = "对账信息（公对公支付使用）")
    private PiccZbReconciliationReturnModel reconciliationReturnModel;

    @Schema(description = "影像文件上传流程id，用于关联影像文件使用 | 是(涉及影像流程，此节点必录) ")
    private String processId;
}
